package net.telesing.tcmc.back.modelqp;

import net.telesing.tcmc.common.QueryParam;

import net.telesing.tcmc.core.StringUtil;
import org.nutz.dao.Cnd;

/**
 * 资料说明Qp
 *
 * Created by Zmt on 2015/11/10.
 */
public class DataQp extends QueryParam
{
    private String name;

    private Integer type;
    
    private Integer vCode;
    
    @Override
    public Cnd buildWhere()
    {
        Cnd cnd = super.buildWhere();
        if (null != name)
            cnd = cnd.and("FILE_NAME", "LIKE", StringUtil.transferLike(name));
        if (null != type)
            cnd = cnd.and("FILE_TYPE", "=", type);
        if (null != vCode)
            cnd = cnd.and("VERSION_CODE", "=", vCode);
        cnd.desc("ID");
        return cnd;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public Integer getvCode()
    {
        return vCode;
    }

    public void setvCode(Integer vCode)
    {
        this.vCode = vCode;
    }
    
}
